<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>
<%@ Import Namespace="HTMLHelpers.Controllers"%>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Form Samples
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Form Samples</h2>
    <p>View source to see the code rendered</p>
    <% using(Html.BeginForm()) { %>
    <!-- Form Content  -->
    <% } %>

    <% using (Html.BeginForm("Home", "About"))
       { %>
    <!-- Form Content  -->
    <% } %>

    <% using (Html.BeginForm("Home", "About", FormMethod.Post))
       { %>
    <!-- Form Content  -->
    <% } %>

    <% using (Html.BeginForm("Home", "About", FormMethod.Post, new Dictionary<string, object> { { "onclick", "alert(\"Hello Mvc\")" } }))
       { %>
    <!-- Form Content  -->
    <% } %>

    <% using (Html.BeginForm<HomeController>(c => c.About(), FormMethod.Post,
                new { onclick = "alert(\"Hello Mvc\")" }))
       { %>
    <!-- Form Content  -->
    <% } %>

    <% Html.BeginForm();  %>
    <!-- Form Content  -->
    <% Html.EndForm();  %>

</asp:Content>
